home *** CD-ROM | disk | FTP | other *** search
- class BOSS1BodyAttack1 extends EnemyAction {
- private int fxTime = 0;
- private boolean[] fShot = new boolean[16];
- private int fxShot = 0;
-
- public BOSS1BodyAttack1(StgFrame var1) {
- super(var1);
- }
-
- public boolean action(EnemyIndex var1) {
- int var2 = super.resource.getEnemySpeed();
- super.resource.getEnemy();
- BOSS1Index var3 = (BOSS1Index)var1;
- BOSS1Index var4 = var3.getLegIndex();
- BOSS1Index var5 = var3.getDefectIndex();
- int var6 = var3.getMove();
- int var7 = var3.getCMove();
- ((StgObjectIndex)var3).movePosition(var6, 0, 0);
- ((StgObjectIndex)var4).movePosition(var6, 0, 0);
- ((StgObjectIndex)var5).movePosition(var6, 0, 0);
- switch (var7) {
- case -2097152:
- var6 = -var6;
- break;
- case -1048576:
- if ((Fixed.Random() & 'ΦÇÇ') != 0) {
- var6 = -var6;
- }
- break;
- case 0:
- if ((Fixed.Random() & 'ΦÇÇ') != 0) {
- var6 = -var6;
- }
- break;
- case 1048576:
- if ((Fixed.Random() & 'ΦÇÇ') != 0) {
- var6 = -var6;
- }
- break;
- case 2097152:
- var6 = -var6;
- }
-
- var7 += var6;
- var3.setMove(var6);
- var3.setCMove(var7);
- if (this.fxTime >= this.fxShot) {
- this.putShot(var1);
- this.fxShot += 524288;
- }
-
- if (this.fxTime >= 8388608) {
- var1.setEnemyAction(new BOSS1BodyNomal(super.resource));
- }
-
- this.fxTime += var2;
- this.destroy(var1);
- return true;
- }
-
- private boolean putShot(EnemyIndex var1) {
- Enemy var2 = super.resource.getEnemy();
- Position var3 = ((StgObjectIndex)var1).getPosition();
- int var5 = var3.getX() - 1048576;
- int var6 = var3.getY() - 2097152;
- short var7 = (short)('蠀' + (Fixed.Random() >> 3));
- int var10 = 327680 + (Fixed.Random() << 2);
- int var11 = 16384 + (Fixed.Random() >> 1);
- int var8 = Fixed.Sin(var7);
- int var9 = Fixed.Cos(var7);
- var8 = Fixed.Mul(var8, var10);
- var9 = Fixed.Mul(var9, var10);
- ES10Index var4 = new ES10Index(new Position(var5, var6, 0), StgData.getSpriteAnimeEZ09Nomal(), new Position(524288, 524288, 0), 0, new ES10Nomal(super.resource), 0, 65536, 100, 1, var9, var11, var8);
- return ((StgObject)var2).add(var4);
- }
-
- public boolean checkHitPlayerShip(EnemyIndex var1, PlayerShipIndex var2) {
- super.resource.getEnemy();
- return ((StgObjectIndex)var1).checkHit(var2);
- }
-
- public boolean checkHitPlayerShot(EnemyIndex var1, PlayerShotIndex var2) {
- boolean var3 = false;
- super.resource.getEnemy();
- if (((StgObjectIndex)var1).checkHit(var2)) {
- var3 = true;
- }
-
- return var3;
- }
-
- public boolean checkHitBom(EnemyIndex var1) {
- return false;
- }
-
- private boolean destroy(EnemyIndex var1) {
- Enemy var2 = super.resource.getEnemy();
- ((StgObjectIndex)var1).getSpriteAnimeIndex();
- boolean var3 = false;
- Status var4 = super.resource.getStatus();
- if (var1.getHitPoint() == 0) {
- var4.add(var1.getScore());
- ((StgObject)var2).delete(var1);
- var3 = true;
- }
-
- return var3;
- }
- }
-